﻿#include "CmdSetHeatMapAddTracer.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdSetHeatMapAddTracer::CmdSetHeatMapAddTracer()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdSetHeatMapAddTracer::~CmdSetHeatMapAddTracer()
    {
    }

    bool CmdSetHeatMapAddTracer::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_setHeatMapAddTracer(m_mainWindowId, m_name, m_x, m_y, m_value, m_tracerStyle, m_size, m_penR, m_penG, m_penB, m_penA, m_interpolating, m_curveInfoID, m_tracerIndex);
        return true;
    }

    void CmdSetHeatMapAddTracer::undo()
    {
    }

    void CmdSetHeatMapAddTracer::redo()
    {
        // execute();
    }

    void CmdSetHeatMapAddTracer::setHeatMapAddTracer(int mainWindowId, QString name, double x, double y, double value, int tracerStyle, int size, int penR, int penG, int penB, int penA,
                            int interpolating, int curveInfoID, int tracerIndex)
    {
        m_mainWindowId = mainWindowId;
        m_name = name;
        m_x = x;
        m_y = y;
        m_value = value;
        m_tracerStyle = tracerStyle;
        m_size = size;
        m_penR = penR;
        m_penG = penG;
        m_penB = penB;
        m_penA = penA;
        m_interpolating = interpolating;
        m_curveInfoID = curveInfoID;
        m_tracerIndex = tracerIndex;

    }

} // namespace PostCommand
